package crazy.interfacee;

public class NodeTest
{
	public static void main(String[] args)
	{
		Node n1 = new Node("N1");
		Node n2 = new Node("N2");
		Node n3 = new Node("N3");
		
		System.out.println(n1);
		System.out.println(n2);
		System.out.println(n3);
		n1.next = n2;
		//n2 = null;
		n3 = n2;
		System.out.println(n1);
		System.out.println(n2);
		System.out.println(n3);
	}
}

class Node
{
	Node next;
	String name;
	
	public Node(String name)
	{
		this.name = name;
	}
	
	public String toString()
	{
		return name;
	}
}
